﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Cua_Hang.DTO;
using Cua_Hang.DAO;

namespace Cua_Hang.BUS
{
    public class ChiTiet_SanPham_BUS
    {
        //-------load Chi Tiet San Pham------------
        public static List<ChiTiet_SanPham_DTO> List_ChiTiet_SanPham_BUS(int ID_ChiTiet_CuaHang)
        {

            return ChiTiet_SanPham_DAO.List_ChiTiet_SanPham_DAO(ID_ChiTiet_CuaHang);
        }
        //-------ket thuc load Chi Tiet San Pham-----------
        //===================================================
        //-------load Chi Tiet San Pham theo id cua hang-----------
        public static List<ChiTiet_SanPham_DTO> List_ChiTiet_SanPham_Theo_id_cuahang_BUS(int ID_cuahang)
        {
            return ChiTiet_SanPham_DAO.List_ChiTiet_SanPham_Theo_id_cuahang_DAO(ID_cuahang);
        }
        //-------ket thuc load Chi Tiet San Pham-----------
        //===================================================
        //==============================================================
        //------ xoa chi tiet san pham ------------
        public static void XoaChiTietSP_BUS(ChiTiet_SanPham_DTO ch)
        {
            ChiTiet_SanPham_DAO.XoaChiTietSP_DAO(ch);
        }
        //-------ket thuc xoa chi tiet san pham ------------

        //==============================================================
        //==================================================================
        //-----------them chi tiet san pham  ------------

        public static void ThemChiTietSP_BUS(ChiTiet_SanPham_DTO ch)
        {
            ChiTiet_SanPham_DAO.ThemChiTietSP_DAO(ch);
        }
        //-------ket thuc them chi tiet cua hang  ------------
        //==============================================================
        //==============================================================
        //---load Chi Tiet San Pham theo id-----------------------------
        public static List<ChiTiet_SanPham_DTO> List_ChiTiet_TheoId_SanPham_BUS(int ch)
        {
          return  ChiTiet_SanPham_DAO.List_ChiTiet_TheoId_SanPham_DAO(ch);
        }
        //-------ket thuc load Chi Tiet San Pham theo id---------
        //===================================================
        //==============================================================
        //------ sua chi tiet sp  ------------
        public static void SuaChiTietSP_BUS(ChiTiet_SanPham_DTO ch)
        {
            ChiTiet_SanPham_DAO.SuaChiTietSP_DAO(ch);
        }
        //-------ket thuc sua chi tiet sp  ------------
        //==============================================================
        //==============================================================
        //------ ham kiem tra chi tiet sp co trong csdl hay chua ------------
        public static Boolean KiemTraTrung_ChiTiet_SP_BUS(ChiTiet_SanPham_DTO ch)
        {

            return ChiTiet_SanPham_DAO.KiemTraTrung_ChiTiet_SP_DAO(ch);
        }
        //-------ket thuc ham kiem tra chi tiet sp co trong csdl hay chua -----------

        //==============================================================
    }
}